home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / GXLayout.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  13.3 KB  |  402 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        GXLayout.h
  3.  
  4.      Contains:    QuickDraw GX layout routine interfaces.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __GXLAYOUT__
  18. #define __GXLAYOUT__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __GXTYPES__
  25.     #include <GXTypes.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. #if defined(__MWERKS__) && TARGET_CPU_68K
  52.     #pragma push
  53.     #pragma pointers_in_D0
  54. #endif
  55.  
  56. EXTERN_API_C( gxShape )
  57. GXNewLayout                        (long                     textRunCount,
  58.                                  const short             textRunLengths[],
  59.                                  const void *            text[],
  60.                                  long                     styleRunCount,
  61.                                  const short             styleRunLengths[],
  62.                                  const gxStyle             styles[],
  63.                                  long                     levelRunCount,
  64.                                  const short             levelRunLengths[],
  65.                                  const short             levels[],
  66.                                  const gxLayoutOptions * layoutOptions,
  67.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0000, 0xA832);
  68.  
  69. EXTERN_API_C( long )
  70. GXGetLayout                        (gxShape                 layout,
  71.                                  void *                    text,
  72.                                  long *                    styleRunCount,
  73.                                  short                     styleRunLengths[],
  74.                                  gxStyle                 styles[],
  75.                                  long *                    levelRunCount,
  76.                                  short                     levelRunLengths[],
  77.                                  short                     levels[],
  78.                                  gxLayoutOptions *        layoutOptions,
  79.                                  gxPoint *                position)                            THREEWORDINLINE(0x303C, 0x0001, 0xA832);
  80.  
  81. EXTERN_API_C( void )
  82. GXSetLayout                        (gxShape                 layout,
  83.                                  long                     textRunCount,
  84.                                  const short             textRunLengths[],
  85.                                  const void *            text[],
  86.                                  long                     styleRunCount,
  87.                                  const short             styleRunLengths[],
  88.                                  const gxStyle             styles[],
  89.                                  long                     levelRunCount,
  90.                                  const short             levelRunLengths[],
  91.                                  const short             levels[],
  92.                                  const gxLayoutOptions * layoutOptions,
  93.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0002, 0xA832);
  94.  
  95. EXTERN_API_C( void )
  96. GXDrawLayout                    (long                     textRunCount,
  97.                                  const short             textRunLengths[],
  98.                                  const void *            text[],
  99.                                  long                     styleRunCount,
  100.                                  const short             styleRunLengths[],
  101.                                  const gxStyle             styles[],
  102.                                  long                     levelRunCount,
  103.                                  const short             levelRunLengths[],
  104.                                  const short             levels[],
  105.                                  const gxLayoutOptions * layoutOptions,
  106.                                  const gxPoint *        position)                            THREEWORDINLINE(0x303C, 0x0003, 0xA832);
  107.  
  108. EXTERN_API_C( void )
  109. GXSetLayoutParts                (gxShape                 layout,
  110.                                  gxByteOffset             oldStartOffset,
  111.                                  gxByteOffset             oldEndOffset,
  112.                                  long                     newTextRunCount,
  113.                                  const short             newTextRunLengths[],
  114.                                  const void *            newText[],
  115.                                  long                     newStyleRunCount,
  116.                                  const short             newStyleRunLengths[],
  117.                                  const gxStyle             newStyles[],
  118.                                  long                     newLevelRunCount,
  119.                                  const short             newLevelRunLengths[],
  120.                                  const short             newLevels[])                            THREEWORDINLINE(0x303C, 0x0004, 0xA832);
  121.  
  122. EXTERN_API_C( void )
  123. GXSetLayoutShapeParts            (gxShape                 layout,
  124.                                  gxByteOffset             startOffset,
  125.                                  gxByteOffset             endOffset,
  126.                                  gxShape                 insert)                                THREEWORDINLINE(0x303C, 0x0005, 0xA832);
  127.  
  128. EXTERN_API_C( long )
  129. GXGetLayoutParts                (gxShape                 layout,
  130.                                  gxByteOffset             startOffset,
  131.                                  gxByteOffset             endOffset,
  132.                                  void *                    text,
  133.                                  long *                    styleRunCount,
  134.                                  short                     styleRunLengths[],
  135.                                  gxStyle                 styles[],
  136.                                  long *                    levelRunCount,
  137.                                  short                     levelRunLengths[],
  138.                                  short                     levels[])                                THREEWORDINLINE(0x303C, 0x0006, 0xA832);
  139.  
  140. EXTERN_API_C( gxShape )
  141. GXGetLayoutShapeParts            (gxShape                 layout,
  142.                                  gxByteOffset             startOffset,
  143.                                  gxByteOffset             endOffset,
  144.                                  gxShape                 dest)                                THREEWORDINLINE(0x303C, 0x0007, 0xA832);
  145.  
  146. EXTERN_API_C( long )
  147. GXGetLayoutGlyphs                (gxShape                 layout,
  148.                                  gxGlyphcode *            glyphs,
  149.                                  gxPoint                 positions[],
  150.                                  long                     advance[],
  151.                                  gxPoint                 tangents[],
  152.                                  long *                    runCount,
  153.                                  short                     styleRuns[],
  154.                                  gxStyle                 glyphStyles[])                        THREEWORDINLINE(0x303C, 0x0008, 0xA832);
  155.  
  156. EXTERN_API_C( gxByteOffset )
  157. GXHitTestLayout                    (gxShape                 layout,
  158.                                  const gxPoint *        hitDown,
  159.                                  gxHighlightType         highlightType,
  160.                                  gxLayoutHitInfo *        hitInfo,
  161.                                  gxShape                 hitTrackingArea)                    THREEWORDINLINE(0x303C, 0x0009, 0xA832);
  162.  
  163. EXTERN_API_C( gxShape )
  164. GXGetLayoutHighlight            (gxShape                 layout,
  165.                                  gxByteOffset             startOffset,
  166.                                  gxByteOffset             endOffset,
  167.                                  gxHighlightType         highlightType,
  168.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000A, 0xA832);
  169.  
  170. EXTERN_API_C( gxShape )
  171. GXGetLayoutVisualHighlight        (gxShape                 layout,
  172.                                  gxByteOffset             startOffset,
  173.                                  long                     startLeadingEdge,
  174.                                  gxByteOffset             endOffset,
  175.                                  long                     endLeadingEdge,
  176.                                  gxHighlightType         highlightType,
  177.                                  gxShape                 highlight)                            THREEWORDINLINE(0x303C, 0x000B, 0xA832);
  178.  
  179. EXTERN_API_C( gxShape )
  180. GXGetLayoutCaret                (gxShape                 layout,
  181.                                  gxByteOffset             offset,
  182.                                  gxHighlightType         highlightType,
  183.                                  gxCaretType             caretType,
  184.                                  gxShape                 caret)                                THREEWORDINLINE(0x303C, 0x000C, 0xA832);
  185.  
  186. EXTERN_API_C( gxByteOffset )
  187. GXGetLayoutBreakOffset            (gxShape                 layout,
  188.                                  gxByteOffset             startOffset,
  189.                                  Fixed                     lineWidth,
  190.                                  long                     hyphenationCount,
  191.                                  const gxByteOffset     hyphenationPoints[],
  192.                                  Boolean *                startIsStaked,
  193.                                  gxByteOffset *            priorStake,
  194.                                  gxByteOffset *            nextStake)                            THREEWORDINLINE(0x303C, 0x000D, 0xA832);
  195.  
  196. EXTERN_API_C( Fixed )
  197. GXGetLayoutRangeWidth            (gxShape                 layout,
  198.                                  gxByteOffset             startOffset,
  199.                                  gxByteOffset             endOffset,
  200.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000E, 0xA832);
  201.  
  202. EXTERN_API_C( gxShape )
  203. GXNewLayoutFromRange            (gxShape                 layout,
  204.                                  gxByteOffset             startOffset,
  205.                                  gxByteOffset             endOffset,
  206.                                  const gxLayoutOptions * layoutOptions,
  207.                                  gxShape                 supplementaryText)                    THREEWORDINLINE(0x303C, 0x000F, 0xA832);
  208.  
  209. EXTERN_API_C( gxShape )
  210. GXGetCaretAngleArea                (gxShape                 layout,
  211.                                  const gxPoint *        hitPoint,
  212.                                  gxHighlightType         highlightType,
  213.                                  gxShape                 caretArea,
  214.                                  short *                returnedRise,
  215.                                  short *                returnedRun)                        THREEWORDINLINE(0x303C, 0x0010, 0xA832);
  216.  
  217. EXTERN_API_C( void )
  218. GXGetStyleBaselineDeltas        (gxStyle                 baseStyle,
  219.                                  gxBaselineType         baseType,
  220.                                  gxBaselineDeltas         returnedDeltas)                        THREEWORDINLINE(0x303C, 0x0011, 0xA832);
  221.  
  222. EXTERN_API_C( gxByteOffset )
  223. GXGetRightVisualOffset            (gxShape                 layout,
  224.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0012, 0xA832);
  225.  
  226. EXTERN_API_C( gxByteOffset )
  227. GXGetLeftVisualOffset            (gxShape                 layout,
  228.                                  gxByteOffset             currentOffset)                        THREEWORDINLINE(0x303C, 0x0013, 0xA832);
  229.  
  230. EXTERN_API_C( void )
  231. GXGetCompoundCharacterLimits    (gxShape                 layout,
  232.                                  gxByteOffset             trial,
  233.                                  gxByteOffset *            minOffset,
  234.                                  gxByteOffset *            maxOffset,
  235.                                  Boolean *                onBoundary)                            THREEWORDINLINE(0x303C, 0x0014, 0xA832);
  236.  
  237. EXTERN_API_C( void )
  238. GXGetOffsetGlyphs                (gxShape                 layout,
  239.                                  gxByteOffset             trial,
  240.                                  long                     leadingEdge,
  241.                                  gxLayoutOffsetState *    offsetState,
  242.                                  unsigned short *        firstGlyph,
  243.                                  unsigned short *        secondGlyph)                        THREEWORDINLINE(0x303C, 0x0015, 0xA832);
  244.  
  245. EXTERN_API_C( void )
  246. GXGetGlyphOffset                (gxShape                 layout,
  247.                                  long                     trial,
  248.                                  long                     onLeftTop,
  249.                                  gxByteOffset *            offset,
  250.                                  Boolean *                leadingEdge,
  251.                                  Boolean *                wasRealCharacter)                    THREEWORDINLINE(0x303C, 0x0016, 0xA832);
  252.  
  253. EXTERN_API_C( void )
  254. GXGetLayoutSpan                    (gxShape                 layout,
  255.                                  Fixed *                lineAscent,
  256.                                  Fixed *                lineDescent)                        THREEWORDINLINE(0x303C, 0x0017, 0xA832);
  257.  
  258. EXTERN_API_C( void )
  259. GXSetLayoutSpan                    (gxShape                 layout,
  260.                                  Fixed                     lineAscent,
  261.                                  Fixed                     lineDescent)                        THREEWORDINLINE(0x303C, 0x0018, 0xA832);
  262.  
  263. EXTERN_API_C( Fixed )
  264. GXGetLayoutJustificationGap        (gxShape                 layout)                                THREEWORDINLINE(0x303C, 0x0279, 0xA832);
  265.  
  266. EXTERN_API_C( void )
  267. GXGetLayoutJustificationFactors    (gxShape                 layout,
  268.                                  Fixed                     constrainedFactors[],
  269.                                  Fixed                     unconstrainedFactors[])                THREEWORDINLINE(0x303C, 0x027A, 0xA832);
  270.  
  271. EXTERN_API_C( void )
  272. GXSetStyleRunControls            (gxStyle                 target,
  273.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x0019, 0xA832);
  274.  
  275. EXTERN_API_C( void )
  276. GXSetStyleRunPriorityJustOverride (gxStyle                 target,
  277.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x001A, 0xA832);
  278.  
  279. EXTERN_API_C( void )
  280. GXSetStyleRunGlyphJustOverrides    (gxStyle                 target,
  281.                                  long                     count,
  282.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x001B, 0xA832);
  283.  
  284. EXTERN_API_C( void )
  285. GXSetStyleRunGlyphSubstitutions    (gxStyle                 target,
  286.                                  long                     count,
  287.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x001C, 0xA832);
  288.  
  289. EXTERN_API_C( void )
  290. GXSetStyleRunFeatures            (gxStyle                 target,
  291.                                  long                     count,
  292.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x001D, 0xA832);
  293.  
  294. EXTERN_API_C( void )
  295. GXSetStyleRunKerningAdjustments    (gxStyle                 target,
  296.                                  long                     count,
  297.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x001E, 0xA832);
  298.  
  299. EXTERN_API_C( void )
  300. GXSetShapeRunControls            (gxShape                 target,
  301.                                  const gxRunControls *    runControls)                        THREEWORDINLINE(0x303C, 0x001F, 0xA832);
  302.  
  303. EXTERN_API_C( void )
  304. GXSetShapeRunPriorityJustOverride (gxShape                 target,
  305.                                  const gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0020, 0xA832);
  306.  
  307. EXTERN_API_C( void )
  308. GXSetShapeRunGlyphJustOverrides    (gxShape                 target,
  309.                                  long                     count,
  310.                                  const gxGlyphJustificationOverride  glyphJustificationOverrides[]) THREEWORDINLINE(0x303C, 0x0021, 0xA832);
  311.  
  312. EXTERN_API_C( void )
  313. GXSetShapeRunGlyphSubstitutions    (gxShape                 target,
  314.                                  long                     count,
  315.                                  const gxGlyphSubstitution  glyphSubstitutions[])                THREEWORDINLINE(0x303C, 0x0022, 0xA832);
  316.  
  317. EXTERN_API_C( void )
  318. GXSetShapeRunFeatures            (gxShape                 target,
  319.                                  long                     count,
  320.                                  const gxRunFeature     runFeatures[])                        THREEWORDINLINE(0x303C, 0x0023, 0xA832);
  321.  
  322. EXTERN_API_C( void )
  323. GXSetShapeRunKerningAdjustments    (gxShape                 target,
  324.                                  long                     count,
  325.                                  const gxKerningAdjustment  kerningAdjustments[])                THREEWORDINLINE(0x303C, 0x0024, 0xA832);
  326.  
  327. EXTERN_API_C( long )
  328. GXGetStyleRunControls            (gxStyle                 source,
  329.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x0025, 0xA832);
  330.  
  331. EXTERN_API_C( long )
  332. GXGetStyleRunPriorityJustOverride (gxStyle                 source,
  333.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x0026, 0xA832);
  334.  
  335. EXTERN_API_C( long )
  336. GXGetStyleRunGlyphJustOverrides    (gxStyle                 source,
  337.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x0027, 0xA832);
  338.  
  339. EXTERN_API_C( long )
  340. GXGetStyleRunGlyphSubstitutions    (gxStyle                 source,
  341.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x0028, 0xA832);
  342.  
  343. EXTERN_API_C( long )
  344. GXGetStyleRunFeatures            (gxStyle                 source,
  345.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x0029, 0xA832);
  346.  
  347. EXTERN_API_C( long )
  348. GXGetStyleRunKerningAdjustments    (gxStyle                 source,
  349.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x002A, 0xA832);
  350.  
  351. EXTERN_API_C( long )
  352. GXGetShapeRunControls            (gxShape                 source,
  353.                                  gxRunControls *        runControls)                        THREEWORDINLINE(0x303C, 0x002B, 0xA832);
  354.  
  355. EXTERN_API_C( long )
  356. GXGetShapeRunPriorityJustOverride (gxShape                 source,
  357.                                  gxPriorityJustificationOverride * priorityJustificationOverride) THREEWORDINLINE(0x303C, 0x002C, 0xA832);
  358.  
  359. EXTERN_API_C( long )
  360. GXGetShapeRunGlyphJustOverrides    (gxShape                 source,
  361.                                  gxGlyphJustificationOverride  glyphJustificationOverrides[])    THREEWORDINLINE(0x303C, 0x002D, 0xA832);
  362.  
  363. EXTERN_API_C( long )
  364. GXGetShapeRunGlyphSubstitutions    (gxShape                 source,
  365.                                  gxGlyphSubstitution     glyphSubstitutions[])                    THREEWORDINLINE(0x303C, 0x002E, 0xA832);
  366.  
  367. EXTERN_API_C( long )
  368. GXGetShapeRunFeatures            (gxShape                 source,
  369.                                  gxRunFeature             runFeatures[])                        THREEWORDINLINE(0x303C, 0x002F, 0xA832);
  370.  
  371. EXTERN_API_C( long )
  372. GXGetShapeRunKerningAdjustments    (gxShape                 source,
  373.                                  gxKerningAdjustment     kerningAdjustments[])                    THREEWORDINLINE(0x303C, 0x0030, 0xA832);
  374.  
  375.  
  376.  
  377. #if defined(__MWERKS__) && TARGET_CPU_68K
  378.     #pragma pop
  379. #endif
  380.  
  381.  
  382. #if PRAGMA_STRUCT_ALIGN
  383.     #pragma options align=reset
  384. #elif PRAGMA_STRUCT_PACKPUSH
  385.     #pragma pack(pop)
  386. #elif PRAGMA_STRUCT_PACK
  387.     #pragma pack()
  388. #endif
  389.  
  390. #ifdef PRAGMA_IMPORT_OFF
  391. #pragma import off
  392. #elif PRAGMA_IMPORT
  393. #pragma import reset
  394. #endif
  395.  
  396. #ifdef __cplusplus
  397. }
  398. #endif
  399.  
  400. #endif /* __GXLAYOUT__ */
  401.  
  402.